import axios from '@/libs/api.request'
// 试题列表
export const questionList = (data) => {
    return axios.request({
        url: '/testManage/list',
        data: data,
        method: 'post'
    })
}
// 所属分类列表
export const sortList = (data) => {
    return axios.request({
        url: '/testManage/sortList',
        data: data,
        method: 'post'
    })
}
// 导入
export const importQuestion = (params, data) => {
    return axios.request({
        url: '/fileManage/import',
        params: params,
        data: data,
        method: 'post'
    })
}
// 导入后修改保存
export const saveQuestion = (data) => {
    return axios.request({
        url: '/testManage/saveAll',
        data: data,
        method: 'post'
    })
}
// 新增
export const addQuestion = (data) => {
    return axios.request({
        url: '/testManage/add',
        data: data,
        method: 'post'
    })
}
// 新增
export const editQuestion = (data) => {
    return axios.request({
        url: '/testManage/update',
        data: data,
        method: 'post'
    })
}

// 获取单个
export const getQuestion = (params) => {
    return axios.request({
        url: '/testManage/info',
        params: params,
        method: 'get'
    })
}

// 删除单个
export const delQuestion = (params) => {
    return axios.request({
        url: '/testManage/delete',
        params: params,
        method: 'get'
    })
}
// 新增编辑试题分类

export const editSort = (data) => {
    return axios.request({
        url: '/testManage/sortSave',
        data: data,
        method: 'post'
    })
}
// 查询试题分类
export const getSort = (data) => {
    return axios.request({
        url: '/testManage/sortList',
        data: data,
        method: 'post'
    })
}
// 删除试题分类

export const delSort = (params) => {
    return axios.request({
        url: '/testManage/sortDelete',
        params: params,
        method: 'get'
    })
}
// 校验题干是否重复
export const getCheck = (data) => {
    return axios.request({
        url: '/testManage/checkTest',
        data: data,
        method: 'post'
    })
}
